package com.hp.his.basic.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * UPMSPage
 * 
 * @author Danny
 */
@Entity
@Table(name = "UPMS_PAGE")
public class UPMSPage{

	private Integer id;
	private String pageId;
	private String pageName;
	private Integer priority;
	private String assignee;
	private String walkthroughAssignee;
	private String team;
	private String status;
	private String issues;
	private String reviewer;
	private Integer completion;
	private String notes;
	private Date expectedCompletionDate;
	private String testPlanApprovedFlag;       
	private String unitTestPlanUrl;            
	private String walkthroughChecklistUrl;    
	private String unitTestArtifactsUrl;       

	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="SEQID",  nullable = false, unique = true)
	public Integer getId() {
		return id;
	}
	

	public void setId(Integer id) {
		this.id = id;
	}		
	
	@Column(name="PAGEID", nullable = false, unique = true, length=10)
	public String getPageId() {
		return pageId;
	}

	public void setPageId(String pageId) {
		this.pageId = pageId!=null ? pageId.trim() : pageId;
	}

	@Column(name="PAGENAME",  length=200)
	public String getPageName() {
		return pageName;
	}

	public void setPageName(String pageName) {
		this.pageName = pageName!=null ? pageName.trim() : pageName;
	}

	@Column(name="PRIORITY")
	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	@Column(name="ASSIGNEE",  length=50)
	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee!=null ? assignee.trim() : assignee;
	}

	@Column(name="TEAM",  length=50)	
	public String getTeam() {
		return team;
	}

	public void setTeam(String team) {
		this.team = team!=null ? team.trim() : team;
	}

	@Column(name="STATUS",  length=20)	
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status!=null ? status.trim() : status;
	}

	@Column(name="ISSUES",  length=100)	
	public String getIssues() {
		return issues;
	}

	public void setIssues(String issues) {
		this.issues = issues!=null ? issues.trim() : issues;
	}

	@Column(name="REVIEWER",  length=50)	
	public String getReviewer() {
		return reviewer;
	}

	public void setReviewer(String reviewer) {
		this.reviewer = reviewer!=null ? reviewer.trim() : reviewer;
	}

	@Column(name="COMPLETION")	
	public Integer getCompletion() {
		return completion;
	}

	public void setCompletion(Integer completion) {
		this.completion = completion;
	}

	@Column(name="NOTES",  length=2000)
	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes!=null ? notes.trim() : notes;
	}

	public String getWalkthroughAssignee() {
		return walkthroughAssignee;
	}


	public void setWalkthroughAssignee(String walkthroughAssignee) {
		this.walkthroughAssignee = walkthroughAssignee;
	}

	@Temporal(TemporalType.DATE)
	public Date getExpectedCompletionDate() {
		return expectedCompletionDate;
	}


	public void setExpectedCompletionDate(Date expectedCompletionDate) {
		this.expectedCompletionDate = expectedCompletionDate;
	}


	public String getTestPlanApprovedFlag() {
		return testPlanApprovedFlag;
	}


	public void setTestPlanApprovedFlag(String testPlanApprovedFlag) {
		this.testPlanApprovedFlag = testPlanApprovedFlag;
	}


	public String getUnitTestPlanUrl() {
		return unitTestPlanUrl;
	}


	public void setUnitTestPlanUrl(String unitTestPlanUrl) {
		this.unitTestPlanUrl = unitTestPlanUrl;
	}


	public String getWalkthroughChecklistUrl() {
		return walkthroughChecklistUrl;
	}


	public void setWalkthroughChecklistUrl(String walkthroughChecklistUrl) {
		this.walkthroughChecklistUrl = walkthroughChecklistUrl;
	}


	public String getUnitTestArtifactsUrl() {
		return unitTestArtifactsUrl;
	}


	public void setUnitTestArtifactsUrl(String unitTestArtifactsUrl) {
		this.unitTestArtifactsUrl = unitTestArtifactsUrl;
	}


	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
